<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.js"></script>
</head>
<body>
    <div id="app">
        <button v-on:click="fn">点击弹出</button>
        <button v-on:click="fn2(3)">点击弹出</button>
        <button @click="fn">点击弹出</button>
    </div>
    <script>
        let vm = new Vue({
            el:"#app",
            data:{

            },
            methods:{
                fn(e){
                    console.log(e)
                    alert(1)
                },
                fn2(n){
                    alert(n)
                },
            }
        })

        /*
        btn.onclick = fn;

        btn.onclick = function(){
            fn(2)
        }
        */
    </script>
    
</body>
</html>